package com.lsa.letcode.the94.btInorderTraversal;

import static org.junit.Assert.*;

import java.io.IOException;

import org.junit.Test;

import com.lsa.letcode.common.LetCodeTestBase;
import com.lsa.letcode.common.TreeNode;
import com.lsa.letcode.common.TreeUtils;

public class BtInorderTraversalTest extends LetCodeTestBase {
	@Test
	public void test() throws Exception {
		test("treeUtilsTest.tgf");
		test("treeUtilsTest2.tgf");
	}

	private void test(String tgfName) throws IOException {
		TreeNode n = TreeUtils.fromTgf(this.getClass(), tgfName);
		Solution s = new Solution();
		assertEquals(s.inorderTraversalRec(n), s.inorderTraversal(n));
	}
}